﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RentProjectionEditControl.ascx.cs" Inherits="LenderClearingHouse.RentProjectionEditControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnCalculate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" UpdatePanelHeight="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%">
<table>
    <tr>
        <td valign="top"> 
            <table>
                <tr>
                    <td>
                        APN
                    </td>
                    <td>
                        <telerik:RadTextBox ID="edAPN" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Apn") %>'
                            Enabled="False" ReadOnly="True" Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Property
                    </td>
                    <td>
                        <telerik:RadTextBox ID="edPropertyLocation" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.PropertyLocation") %>' Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        ZIP
                    </td>
                    <td>
                        <telerik:RadTextBox ID="edZipCode" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.ZipCode") %>' Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Owner
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlInvestor" runat="server">
                        </asp:DropDownList>
                    </td>                    
                </tr>
            </table>
        </td>
        <td valign="top"> 
            <table>
                <tr>
                    <td>
                        Purchase Price
                    </td>
                    <td>
                        <telerik:RadNumericTextBox ID="tbPurchasePrice" runat="server" 
                            OnTextChanged="tb_TextChanged" Width="100px" Culture="en-US" 
                            LabelWidth="64px" Type="Currency" DbValue='<%# DataBinder.Eval( Container, "DataItem.PurchasePrice") %>'>
                        </telerik:RadNumericTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Closing Cost
                    </td>
                    <td>
                        <telerik:RadNumericTextBox ID="tbClosingCost" runat="server"
                            OnTextChanged="tb_TextChanged" Width="100px" Culture="en-US" 
                            LabelWidth="64px" Type="Currency" DbValue='<%# DataBinder.Eval( Container, "DataItem.ClosingCost") %>'>
                        </telerik:RadNumericTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Rent/month
                    </td>
                    <td>
                        <telerik:RadNumericTextBox ID="tbRentMonth" runat="server"
                            OnTextChanged="tb_TextChanged" Width="100px" Culture="en-US" 
                            LabelWidth="64px" Type="Currency" DbValue='<%# DataBinder.Eval( Container, "DataItem.RentMonth") %>'>
                        </telerik:RadNumericTextBox>
                    </td>
                </tr>

                <tr>
                    <td>
                        HOA/Month
                    </td>
                    <td>
                        <telerik:RadNumericTextBox ID="tbHOAMonth" runat="server"
                            OnTextChanged="tb_TextChanged" Width="100px" Culture="en-US" 
                            LabelWidth="64px" Type="Currency" DbValue='<%# DataBinder.Eval( Container, "DataItem.HOAMonth") %>'>
                        </telerik:RadNumericTextBox>
                    </td>
                </tr>
            </table>
        </td>
        <td valign="top"> 
            <table>
                <tr>
                    <td>
                        Date Rented From
                    </td>
                    <td>
                        <telerik:RadDatePicker ID="tbDateRentedFrom" runat="server" DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.DateRentedFrom") %>'>
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr>
                    <td>
                        Date Rented To
                    </td>
                    <td>
                        <telerik:RadDatePicker ID="tbDateRentedTo" runat="server" DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.DateRentedTo") %>'>
                        </telerik:RadDatePicker>
                    </td>
                </tr>
            </table>
        </td>
        <td valign="top"> 
            <table>
                <tr>
                    <td>
                        Property Management<br/>Company
                    </td>
                    <td>
                        <telerik:RadTextBox ID="tbManagementCompany" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.ManagementCompany") %>' Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Contact
                    </td>
                    <td>
                        <telerik:RadTextBox ID="tbContact" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Contact") %>' Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Company Phone
                    </td>
                    <td>
                        <telerik:RadTextBox ID="tbCompanyPhone" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.CompanyPhone") %>' Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Company Address
                    </td>
                    <td>
                        <telerik:RadTextBox ID="tbCompanyAddress" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.CompanyAddress") %>' Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="4">
            <fieldset style="padding:0; margin:0;">
                <legend>Unit info</legend>
                <table width="100%">
                    <tr>
                        <td style="width:200px; vertical-align:top;">
                            <table width="100%">
                                <tr>
                                    <td>
                                        Unit #
                                    </td>
                                    <td>
                                        <telerik:RadTextBox ID="edUnitNumber" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.UnitNumber") %>' Width="100px"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        SquareFootage 
                                    </td>
                                    <td>
                                        <telerik:RadNumericTextBox ID="edSquareFootage" Runat="server" Culture="en-US" LabelWidth="64px" Type="Number" DbValue='<%# DataBinder.Eval( Container, "DataItem.SquareFootage") %>' Width="100px">
                                        </telerik:RadNumericTextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td style="width:200px; vertical-align:top;">
                            <table width="100%">
                                <tr>
                                    <td>
                                        Bed
                                    </td>
                                    <td>
                                        <telerik:RadComboBox ID="edBedrooms" runat="server" Width="100px"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Bath
                                    </td>
                                    <td>
                                        <telerik:RadTextBox ID="edBathrooms" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Bathrooms") %>' Width="100px"/>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td style="width:200px; vertical-align:top;">
                            <table width="100%">
                                <tr>
                                    <td>
                                        Rehab
                                    </td>
                                    <td>
                                        <telerik:RadNumericTextBox ID="edRehab" Runat="server" Culture="en-US" LabelWidth="64px" Type="Currency" DbValue='<%# DataBinder.Eval( Container, "DataItem.Rehab") %>' Width="100px">
                                          <NumberFormat ZeroPattern="$n"></NumberFormat>
                                        </telerik:RadNumericTextBox>
                                        <asp:HiddenField runat="server" ID="hdRentProjectionUnitId" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td style="width:250px; vertical-align:top;">
                            <table width="100%">
                            <tr>
                                <td>
                                    Renter Name
                                </td>
                                <td>
                                    <telerik:RadTextBox ID="tbRenterName" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.RenterName") %>' Width="150px">
                                    </telerik:RadTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Renter Phone
                                </td>
                                <td>
                                    <telerik:RadTextBox ID="tbRenterPhone" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.RenterPhone") %>' Width="150px">
                                    </telerik:RadTextBox>
                                </td>
                            </tr>

                            </table>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </td>
    </tr>
</table>
</telerik:RadAjaxPanel>

<br />
<table>
    <tr>
        <td>
            <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" />
            <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert" />
            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>
<asp:HiddenField runat="server" ID = "hdF2" />
<asp:HiddenField runat="server" ID = "hdK2" />
<asp:HiddenField runat="server" ID = "hdL2" />
<asp:HiddenField runat="server" ID = "hdM2" />
<asp:HiddenField runat="server" ID = "hdN2" />
<asp:HiddenField runat="server" ID = "hdP2" />
